package core.source.service;

import core.source.pojo.dto.PorjectDTO;
import core.source.pojo.entity.Column;
import core.source.pojo.entity.Library;
import core.source.pojo.entity.Porject;
import core.source.pojo.entity.Table;

import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.util.List;
import java.util.Map;

/**
 * @author Long
 * @version 1.0
 * @description:
 * @title SourceService
 * @date 2021/3/6 9:54
 */
public interface SourceService {

    List<Map<String, Object>> getData(Porject porject, DatabaseMetaData metaData, String libraryName);

    List<Map<String, Object>> getData(Porject porject, Library library);

    Porject getPorject(PorjectDTO dto);

    List<Library> getLibrarys(DatabaseMetaData metaData);

    List<Library> getLibrarys(DatabaseMetaData metaData, String[] libraryNames);

    Library getLibrary(DatabaseMetaData metaData, String libraryName);

    Library getLibrary(DatabaseMetaData metaData, Library library);

    Library getLibrary(ResultSet resultSet);

    List<Table> getTables(DatabaseMetaData metaData, String[] tableNames);

    List<Table> getTables(DatabaseMetaData metaData);

    List<Table> getTables(DatabaseMetaData metaData, ResultSet resultSet);

    Table getTable(ResultSet resultSet);

    Table getTable(DatabaseMetaData metaData, String tableName);

    Table getTable(Table table);

    List<Column> getColumns(DatabaseMetaData metaData, String tableName);

    List<Column> getColumns(ResultSet resultSet, String keys);

    Column getColumn(ResultSet resultSet, String keys);

    Column getColumn(Column column);

    ResultSet getTableResultSet(DatabaseMetaData metaData, String tableName);

    ResultSet getColumnResultSet(DatabaseMetaData metaData, String tableName);

    String getKeys(DatabaseMetaData metaData, String tableName);

    Map<String,String> getProperties();

    Map<String,String> getProperties(String path);
}
